package fogcore

//FoGoGameView 返回给前端的信息
type FoGoGameView struct {
	Points     []PointStatus //棋盘上共有19*19个落子点
	N          int           //n*n棋盘
	Masks      []Mask        //迷雾 masks[player]获取对应的 []Mask
	PieceColor PointStatus   //当前落子的一方
	YourColor  PointStatus   //你的颜色
	History    []ColorPoint  //落子记录
	CountBK    int           //黑棋吃子数
	CountWK    int           //白旗吃子数
}

func View(fogGoGame *FogGoGame, color PointStatus) *FoGoGameView {
	return &FoGoGameView{
		Points:     fogGoGame.Board.points,
		N:          fogGoGame.Board.n,
		Masks:      fogGoGame.Board.masks[color],
		PieceColor: fogGoGame.PieceColor,
		YourColor:  color,
		CountWK:    fogGoGame.CountWK,
		CountBK:    fogGoGame.CountBK,
	}
}
